﻿@model GPS.ENTITYS.ViewModelDGV_TRUNG_CMT
@using PagedList.Mvc;
@using GPS.Helpers;
@{
    ViewBag.Title = "Cảnh báo giảng viên trùng CMTND";
}

<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>

<script src="~/Scripts/jquery.maskedinput.js"></script>
<script src="~/Scripts/datepicker.js"></script>



<div class="container fdb-div-content fdb-div-corner-all">
    <h3 class="text-center fdb-title-search-form">Danh sách giảng viên trùng CMTND</h3>
    <div class="row">

        @using (Html.BeginForm("Index", "GPS_TrackingGiaoVienDupCMT", FormMethod.Get))
        {
            <div class="list-group">
                @*<fieldset class="fs_body">
                    <legend class="head_title">Điều Kiện Tìm Kiếm</legend>
                        <div class="criteria_search">
                            <div class="row margin-top-05">
                                <div class="col-md-2 control-label">
                                    Đơn vị đào tạo
                                </div>
                                <div class="col-md-4">
                                    @Html.DropDownListFor(model => model.CB_PT_DVGTVT_MA, (SelectList)ViewBag.DVGTVT_MAs, "---Lựa chọn--", new { @class = "form-control", @id = "DVGTVT_MA_dll" })
                                </div>

                            </div>


                        </div>

                   <div class="row margin-top-05 btn_search">
                        <button type="submit" class="btn btn-primary btn-sm">
                            <span class="glyphicon glyphicon-search"></span> Tìm kiếm
                        </button>

                    </div>
                </fieldset>*@
            </div>
        }

        <div class="row">
            <fieldset class="fs_body">
                <legend class="head_title">Thông tin chi tiết</legend>

                <div class="row margin-top-05">
                    <div class="divbtnFielset">
                        <div style="float: right;">
                            <label id="lblMessageTotal" style="color:blue; font-weight:bold">Tổng số bản ghi: @ViewBag.TotalRow</label>
                        </div>
                    </div>
                </div>

                <table class="table table-hover" >
                    <tr>
                        <th>
                            STT
                        </th>
                        <th>
                            Mã GV
                        </th>
                        <th>
                            Đơn vị GTVT
                        </th>
                        <th>
                            Họ đệm
                        </th>
                        <th>
                            Tên
                        </th>
                        <th>
                            Ngày sinh
                        </th>
                        <th>
                            Hình ảnh
                        </th>
                        <th>
                            Số CMT
                        </th>
                        <th>
                            Giới tính
                        </th>
                        <th>
                            Điện thoại
                        </th>
                        <th>
                            Số QĐCN
                        </th>
                        <th>
                            Ngày QĐCN
                        </th>
                    </tr>
                    @{

                        if (Model.SearchResults != null)
                        {
                            int i = 0;

                            foreach (var item in Model.SearchResults)
                            {
                                <tr>
                                    <td align="center">
                                        @(i + 1)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_MA)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.DVGTVT_TEN)
                                    </td>

                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_HODEM)
                                    </td>


                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_TEN)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_NGAYSINH)
                                    </td>
                                    <td align="center">
                                        @{
                                String img64Url = string.Empty;
                                if (item.GV_ANHCD != null)
                                {
                                    String img64 = Convert.ToBase64String(item.GV_ANHCD);
                                    img64Url = string.Format("data:image/" + item.GV_ANHCD + ";base64,{0}", img64);
                                }
                                        }
                                        <img src="@img64Url" width="50" height="50" />
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_SOCMT)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_GIOITINH)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_TEL)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_SOQD_GCN)
                                    </td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.GV_NGAYQD_GCN)
                                    </td>
                                </tr>
                                i++;
                            }
                        }
                    }
                </table>
                <div class="pagination-sm">
                    @Html.PagedListPager(Model.SearchResults, page => Url.Action("Index", new
   {
       page
   }))
                </div>
            </fieldset>
        </div>
    </div>
</div>

<!-- delete modal placeholder-->
<div id='deleteModal' class='modal fade in'>
    <div class="modal-dialog">
        <div class="modal-content">
            <div id='deleteModalContent'></div>
        </div>
    </div>
</div>

<!-- modal placeholder-->
<div id='myModal' class='modal fade in'>
    <div class="modal-dialog">
        <div class="modal-content">
            <div id='myModalContent'></div>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/modalform")
}




